home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nebula 2
/
Nebula Two.iso
/
SourceCode
/
MiscKit1.7.1
/
MiscKit
/
Temp
/
Text_more
/
Text_more.m
< prev
next >
Wrap
Text File
|
1995-04-12
|
1KB
|
70 lines
/* Text_more.m
*
* This category makes dealing with the Text object easier.
* See the docu for details.
*
* For interface-info see the header file. The comments in this file mostly
* cover only the real implementation details.
*
* Written by: Thomas Engel
* Created: 30.01.1995 (Copyleft)
* Last modified: 30.01.1995
* Copyright (C) 1995 Thomas Engel
*/
// The following define is a fake. Looks like NeXT...but it is a cheatmode
// action.
// We don't have a RTFD paste type. But I really need one !
#define NXRTFDPboardType NXUniqueString("NeXT RTFD pasteboard type")
#import "Text_more.h"
@implementation Text(More)
- copyTo:aPasteboard
{
NXAtom textTypes[5];
if( [self isMonoFont] )
{
textTypes[0] = NXAsciiPboardType;
textTypes[1] = NULL;
}
// In the other case we will cheat. The RTFD type was NEVER defined by
// NeXT. But we will use it...it works. (see the define)
else
{
textTypes[0] = NXRTFDPboardType;
textTypes[1] = NXTIFFPboardType;
textTypes[2] = NXRTFPboardType;
textTypes[3] = NXAsciiPboardType;
textTypes[4] = NULL;
}
[self writeSelectionToPasteboard:aPasteboard types:textTypes];
return self;
}
- cutTo:aPasteboard
{
[self copyTo:aPasteboard];
[self delete:self];
return self;
}
- pasteFrom:aPasteboard
{
[self readSelectionFromPasteboard:aPasteboard];
return self;
}
@end
/*
* History: 30.01.95 Buh
*
*
* Bugs: - ...
*/